package ui;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;

public class LoadingState extends BasicGameState {
	private int loadingDot = 0;

	@Override
	public void init(GameContainer gc, StateBasedGame game) throws SlickException {
		
	}

	@Override
	public void render(GameContainer gc, StateBasedGame game, Graphics g) throws SlickException {
		String string = "Loading";
		for (int i = 0; i < loadingDot; i++){
			string += ".";
		}
		g.drawString(string, 100, 100);
		loadingDot = loadingDot + 1 > 3 ? 0 : loadingDot + 1;
	}

	@Override
	public void update(GameContainer gc, StateBasedGame game, int delta) throws SlickException {
	}

	@Override
	public int getID() {
		// TODO Auto-generated method stub
		return GameStateSwitcher.LOADING_STATE;
	}

}
